﻿using System;
using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.SkillEffective + "/" + SkillEditorConst.ReplaceTargetSelect, typeof(SkillEditorGraph))]
    public class SkillEffectiveNode_ReplaceTargetSelect : SkillEffectiveNode
    {
        protected override ESkillEffectiveType effectType => ESkillEffectiveType.ReplaceTargetSelect;
        [Output] public TargetSelectSetPort target;

        protected override SkillCustomConfig CreateConfig()
        {
            var rConfig = new SkillEffective_ReplaceTargetSelect_ConfigData()
            {
            };
            this.target = new TargetSelectSetPort((x) => rConfig.select = x);
            return rConfig;
        }
    }

    public class TargetSelectSetPort
    {
        public Action<TargetSelectConfig> setter;
        public TargetSelectSetPort(Action<TargetSelectConfig> setter)
        {
            this.setter = setter;
        }
    }
}